With many electronic products, security of the data written to and read from memory is important. Examples of such products include portable devices such as cell phones, portable computers, voice recorders, and the like, as well as many larger electronic systems that are utilized in cars, planes, and industrial control systems. To improve security, a processor may be used to encrypt and decrypt data being transferred to and from memory.
Typically, when encrypting data, the processor encrypts data according to a specified algorithm. However, when certain data is encrypted, it may result in such data being encrypted such that it has a value equivalent to an erased or a blank memory location and would be read as erased or blank memory when, in fact, the information is actual data (e.g., data with a value different from that of erased or blank memory). Similarly, when a memory location has been erased or is blank, and an attempt is made to read this memory location and decrypt the information therein, such information may be decrypted such that it could be interpreted as actual data, when, in fact, the memory location had no actual data; that is, it contained information associated with erased or blank memory. As a result, it is difficult for software, when utilizing such information, to make a distinction between information associated with actual data and information associated with erased or blank memory.